<!--<?php
include_once PrintEot('left');
print <<<EOT
-->
<script src="mode/house/js/city.js" language="JavaScript" type="text/javascript"></script>
<script type="text/javascript">
function defaultIndex(){
	var newHouse = getObj("open_new");
	var newSecond = getObj("open_second");
	var defaultIndex = getObj("defaultindex");
	if(newHouse.checked && newSecond.checked){
		defaultIndex.style.display = "";
	}else{
		defaultIndex.style.display = "none";
	}
}
</script>
<form method="post" id="testform" name="FORM" action="$basename&">
<input type="hidden" value="edit" name="act"/>
<div class="nav3 mb10">
    <ul id="house_basictype" class="cc">
        <li id="core" onclick="showaction('house_basic','core')" class="current"><a hidefocus="true" href="javascript:" onclick="return false;">房产核心设置</a></li>
		<li id="hottag" onclick="showaction('house_basic','hottag')"><a hidefocus="true" href="javascript:" onclick="return false;">热门搜索</a></li>
    </ul>
</div>
<div id="stypecore" style="display:none;">
	<h2 class="h1">业务开启</h2>
	<div class="admin_table mb10">
		<table width="100%" cellspacing="0" cellpadding="0">
			<tr class="tr1">
				<td class="td1">开启业务模块</td>
				<td class="td2">
					<ul class="list_A list_120">
						<li><input onclick="defaultIndex()" type="checkbox" name="config[house_newhouseifopen]" value="1" $house_newhouseifopenCheck id="open_new"/>新房</li>
						<li><input onclick="defaultIndex()" type="checkbox" name="config[house_secondhouseifopen]" value="1" $house_secondhouseifopenCheck id="open_second" />二手房、租房</li>
					</ul>
				</td>
			</tr>
			
			<tr class="tr1" id="defaultindex" style="display:{$style}">
				<td class="td1">默认首页</td>
				<td class="td2">
					<ul class="list_A list_120">
						<li><input type="radio" name="config[house_defaultindex]" value="1" $house_defaultindex_Y id="defaultindex_new" />新房</li>
						<li><input type="radio" name="config[house_defaultindex]" value="0" $house_defaultindex_N id="defaultindex_second"/>二手房、租房</li>
					</ul>
				</td>
			</tr>
		</table>
	</div>
	<h2 class="h1"><span class="fl mr10">地域设置</span></h2>
	<div class="admin_table mb10">
		<table cellspacing="0" cellpadding="0" width="100%">
			<tbody>
			<tr class="tr1 vt">
				<td class="td1">默认城市</td>
				<td class="td2">
					<select id="selProvince" onChange = "getCity(this.options[this.selectedIndex].value,'')"></select>
					<select id="selCity" name="config[house_mapcity]"><option>-城市-</option></select>
				</td>
				<td class="td2"><div class="help_a">地图默认显示城市设置</div></td>
			</tr>
			<tr class="tr1 vt">
				<td class="td1">MAPABC KEY 设置</td>
				<td class="td2">
					<textarea class="textarea" name="config[house_mapkey]" >{$house_mapkey}</textarea>
				</td>
				<td class="td2"><div class="help_a">楼盘地图功能，需要先维护MAPABC的API Key后才能正常使用。<a href="http://code.mapabc.com/key.shtml" target="_blank">点此获取MAPABC API KEY</a></div></td>
			</tr>
			<tr class="tr1 vt">
				<td class="td1">地图周边楼盘搜索范围</td>
				<td class="td2">
					<ul class="list_A fl">
						<li><label><input type="radio" value="5" name="config[house_mapsearch]" $house_mapsearch_a />5千米</label></li>
						<li><label><input type="radio" value="10" name="config[house_mapsearch]" $house_mapsearch_b />10千米</label></li>
						<li><label><input type="radio" value="15" name="config[house_mapsearch]" $house_mapsearch_c />15千米</label></li>
					</ul>
				</td>
				<td class="td2"><div class="help_a">确定具体楼盘展示页的地图功能，"周边楼盘"的查询范围</div></td>
			</tr>
			</tbody>
		</table>
	</div>
	<h2 class="h1"><span class="fl mr10">新房</span></h2>
	<div class="admin_table mb10">
		<table cellspacing="0" cellpadding="0" width="100%">
			<tbody><tr class="tr1 vt">
				<td class="td1">游客点评</td>
				<td class="td2">
					<div class="list_A list_80">
						<ul class="cc">
							<li><input type="radio" value="1" name="config[house_evaluation_open]" $house_evaluation_open_Y />开启</li>
							<li><input type="radio" value="0" name="config[house_evaluation_open]" $house_evaluation_open_N />关闭</li>
						</ul>
					</div>
				</td>
				<td class="td2"><br /></td>
			</tr>
			<tr class="tr1 vt">
				<td class="td1">点评审核</td>
				<td class="td2">
					<div class="list_A list_80">
						<ul class="cc"> 
							<li><input type="radio" value="1" name="config[house_evaluation_check]" $house_evaluation_check_Y />开启</li>
							<li><input type="radio" value="0" name="config[house_evaluation_check]" $house_evaluation_check_N />关闭</li>
						</ul>
					</div>
				</td>
				<td class="td2"><br /></td>
			</tr>
			</tbody>
		</table>
	</div>
	<h2 class="h1">房源有效期</h2>
	<div class="admin_table mb10">
		<table width="100%" cellspacing="0" cellpadding="0">
			<tr class="tr1">
				<td class="td1">
					出租房源(单位:天)
				</td>
				<td class="td2">
					<input type="text" value="$house_hire_expried" name="config[house_hire_expried]" class="input input_wc"/>
				</td>
				<td class="td2"><div class="help_a">出租房源有效期不能为空</div></td>
			</tr>
			
			<tr>
				<td class="td1">出售房源(单位:天)</td>
				<td class="td2">
					<input type="text" value="$house_sale_expried" name="config[house_sale_expried]" class="input input_wc"/>
				</td>
				<td class="td2"><div class="help_a">出售房源有效期不能为空</div></td>
			</tr>
		</table>
	</div>
	<h2 class="h1">置顶房源</h2>
	<div class="admin_table mb10">
		<table width="100%" cellspacing="0" cellpadding="0">
			<tr class="tr1">
				<td class="td1">置顶房源</td>
				<td class="td2">
					<ul class="list_A list_80 cc">
						<li><input type="radio" value="1" name="config[house_topifopen]" $house_topifopen_Y />开启</li>
						<li><input type="radio" value="0" name="config[house_topifopen]" $house_topifopen_N />关闭</li>
					</ul>
				</td>
			</tr>
			<tr class="tr1 vt">
				<td class="td1">出售价格<br />（时间周期为日）</td>
				<td class="td2"><input type="text" class="input input_wc" name="config[house_sale_topprice]" value="$house_sale_topprice" />
					<select name="config[house_sale_topcredit]">
						$topSaleCreditList
					</select></td>
			</tr>
			<tr class="tr1 vt">
				<td class="td1">出售列表置顶数<br /></td>
				<td class="td2">
					<input type="text" class="input input_wc" name="config[house_sale_num]" value="$house_sale_num" />
			</tr>
			<tr class="tr1 vt">
				<td class="td1">出租价格<br />（时间周期为日）</td>
				<td class="td2"><input type="text" class="input input_wc" name="config[house_hire_topprice]" value="$house_hire_topprice" />
					<select name="config[house_hire_topcredit]">
						$topHireCreditList
					</select></td>
			</tr>
			<tr class="tr1 vt">
				<td class="td1">出租列表置顶数<br /></td>
				<td class="td2">
					<input type="text" class="input input_wc" name="config[house_hire_num]" value="$house_hire_num" />
			</tr>
		</table>
	</div>
	<h2 class="h1">加急房源</h2>
	<div class="admin_table mb10">
		<table width="100%" cellspacing="0" cellpadding="0">
			<tr class="tr1">
				<td class="td1">加急房源</td>
				<td class="td2">
					<ul class="list_A list_80 cc">
						<li><input type="radio" value="1" name="config[house_rapidifopen]" $house_rapidifopen_Y />开启</li>
						<li><input type="radio" value="0" name="config[house_rapidifopen]" $house_rapidifopen_N />关闭</li>
					</ul>
				</td>
			</tr>
			<tr class="tr1 vt">
				<td class="td1">出售价格<br />（时间周期为日）</td>
				<td class="td2"><input type="text" class="input input_wc" name="config[house_sale_rapidprice]" value="$house_sale_rapidprice" />
					<select name="config[house_sale_rapidcredit]">
						$rapidSaleCreditList
					</select></td>
			</tr>
			<tr class="tr1 vt">
				<td class="td1">出租价格<br />（时间周期为日）</td>
				<td class="td2"><input type="text" class="input input_wc" name="config[house_hire_rapidprice]" value="$house_hire_rapidprice" />
					<select name="config[house_hire_rapidcredit]">
						$rapidHireCreditList
					</select></td>
			</tr>		
		</table>
	</div>
	<h2 class="h1">房源发布协议 </h2>
	<div class="admin_table mb10">
		<table width="100%" cellspacing="0" cellpadding="0">
			<tr class="tr1 vt">
				<td class="td1">房源发布协议</td>
				<td class="td2"><textarea style="height: 250px;" class="textarea" name="config[house_permit]">{$house_permit}</textarea></td>
				<td class="td2"><div class="help_a" style="display: block;">房源发布协议的内容。支持html代码。<br>如: &lt;font color="red"&gt;您好&lt;/font&gt;&lt;a href="http://www.phpwind.net"&gt;phpwind board&lt;/a&gt;<br>代表: <font color="red">您好</font><a href="http://www.phpwind.net">phpwind board</a></div></td>
			</tr>
		</table>
	</div>
</div>
<script type="text/javascript">
getProvince('$house_mapcity');
</script>
<script language="JavaScript" src="js/global.js"></script>
<script src="js/pw_ajax.js" language="JavaScript" type="text/javascript"></script>
<input type="button" name="ajaxsub" id="ajaxsub" style="display:none" onclick="ajax.submit(document.FORM,function(){});"/>
<div id="stypehottag" style="display:none;">
	<h2 class="h1"><span class="fl mr10">热门搜索设置</span><span class="linka fl"><a href="javascript:;" class="btn_add" onclick="addtbody('tagmode','tagbody');"><i>添加</i></a></span></h2>
	<div class="admin_table mb10">
		<table cellspacing="0" cellpadding="0" width="100%">
			<tr class="tr2 vt">
                <td width="200">关键字</td>
                <td width="380">url链接</td>
                <td>操作</td>
            </tr>
			<tbody id="tagmode" style="display:none"><tr class="tr1 vt">
                <td class="td2"><input name="tagname[]" class="input input_wa" /></td>
                <td class="td2"><input name="tagurl[]" class="input input_wb" /></td>
                <td class="td2"><a href="javascript:;" onclick="deltbody(this);">[删除]</a></td>
			</tr></tbody>
<!--
EOT;
foreach ($house_hottag as $key => $value) {print <<<EOT
-->
			<tr class="tr1 vt">
                <td class="td2"><input name="tagname[]" class="input input_wa" value="{$value['name']}" /></td>
                <td class="td2"><input name="tagurl[]" class="input input_wb" value="{$value['url']}" /></td>
                <td class="td2"><a href="javascript:;" onclick="deltbody(this);getObj('ajaxsub').click()">[删除]</a></td>
			</tr>
<!--
EOT;
}print <<<EOT
-->
			<tbody id="tagbody"></tbody>
		</table>
	</div>
</div>
<div class="mb10 tac"><span class="btn"><span><button onfocus="blur();" type="submit">提 交</button></span></span></div>
</form>
<script type="text/javascript">
showaction('house_basic','$action');
addtbody('tagmode','tagbody');
function showaction(type,action){
	if (getObj(type+'type')) {
		var obj = getObj(type+'type').getElementsByTagName('li');
		for (var i=0;i<obj.length;i++) {
			if (obj[i].id==action) {
				getObj(obj[i].id).className = 'current';
				getObj('stype'+action).style.display = '';
				setCookie('admin_'+type,action);
			} else {
				getObj(obj[i].id).className = '';
				getObj('stype'+obj[i].id).style.display = 'none';
			}
		}
	}
}
function addtbody(mode,tbody){
	if (getObj(mode)) {
		var s = getObj(mode).firstChild.cloneNode(true);
		getObj(tbody).appendChild(s);
	}
}
function deltbody(obj){
	var o = obj.parentNode.parentNode;
	o.parentNode.removeChild(o);
}
</script>
<!--
EOT;
include_once PrintEot('adminbottom');
?>-->